class MyArray<T>{
    public Object[] arr = new Object[10];
    public T getPos(int pos){
        return (T) this.arr[pos];
    }
    public void setPos(int pos, Object obj){
        this.arr[pos] = obj;
    }
}




public class Test2 {
    public static void main(String[] args) {
        MyArray<String> myArray = new MyArray<>();
        myArray.setPos(0, "hi");
        myArray.setPos(1, "hello");
        String ret = myArray.getPos(1);
        System.out.println(ret);
    }
}
